Processing systems are continually designed with improved speed and capabilities compared to earlier designs. This results in complex processors with ever increasing instruction sets, registers, and caches. As the complexity of processors goes up, the amount of testing and debugging that is performed to maintain a reliable processing system increases. This testing and debugging is also performed to improve the speed and efficiency of code executed on the processing system.
A significant amount of debugging and performance enhancement is done before a processor can successfully be brought on the market. As the amount of debugging needed increases, the time before the finished product can be brought on the market increases. That precious time can be quite long with the current debugging methods.
The current debugging is tedious and time consuming. Testing hardware is usually required and is connected to the processor and puts the processor in a testing mode. Generally, a single instruction is executed and the results of that single execution are analyzed. The result of the execution is then compared to the expected results. For example, if the single instruction was to add “2+2” and put the result in a register and the instruction puts “6” in the register, an error has occurred. If the instruction puts “4” in the register, than an error has not occurred. Care is taken in selecting instructions to test the various aspects of the processor because only a limited number of instructions can feasibly be performed. Also, a user may be required to manually perform the testing and check for errors.
For relatively simple processors, only testing one instruction at a time may be sufficient for testing the processors. However, for more complex processors, only testing only one instruction at a time may not be sufficient to adequately test the processors. To execute more than one instruction or test instruction, each instruction must be loaded, executed and unloaded and then repeated for the next instruction. This “stepping through” can be time consuming for complicated tasks or large number of instructions. Further, additional tasks may need to be performed in between executing each instruction to analyze information and results of executing the instruction.
Furthermore, testing one instruction at a time does not allow for reproducing system level executions. A system level execution or system execution is any set of instructions executed on a processor. A system execution is some part or execution of a program or process on a processor. The system execution may be some part of an execution of a wordprocessor or an input output operation such as a file open command. Each system level execution can encompass a large number of instructions or code which prevents testing one instruction at a time from adequately testing them. It is important that programs execute properly in processing systems. Replaying system executions can allow hard to detect errors to be found in software and in processors or hardware. Additionally, replaying system executions can identify ways to design processing systems so that software can be executed faster.
The testing of system level executions may need to be repeated a significant number of times to adequately identify errors. Additionally, testing of system level executions may need to be restarted at different points in the code or certain parts of the code may need to tested.
Analyzing the information or results of an execution of an instruction can also be problematic with the current art of testing. The effect of one execution needs to be analyzed prior to executing another instruction. Furthermore, the current probe modes fail to provide access to many processing system components such as the system registers and memory. Thus, the results of executing a system execution may not be seen and errors in the processor may not be detected.
The present invention addresses these and other issues associated with replaying system executions.